<!doctype html>
<%
    try
    {
%>
<html lang="en">


    <head>
        <meta charset="utf-8">
        <title>Ramgovind Automated System</title>
        <link rel="stylesheet" href="/RIT/css/bootstrap.css">
        <link rel="stylesheet" href="/RIT/css/jquery.fancybox.css">
        <link rel="stylesheet" href="/RIT/css/login.css">
        <link rel="stylesheet" href="/RIT/css/iconfont.css">
        
        <style>
            small{
                font-size: 15px;
            }
            big{
                font-size: 20px;    
            }
            #hed{
                text-align: center;
                margin-top: 10px;
                font-weight: bold;
                color: #00A3FF;
            }
            #wel{
                text-align: center;
                color: red;
                font-weight: bold;
                margin-top: 5px;
            }
        </style>
    </head>
    <body class='login_body'>
        <div class="wrap">
            <p style="text-align: center"><img src="/RIT/img/ritlogo.png" style="height: 85px"></p>
            <p id="hed"><big>R</big><small>AM </small><big>G</big><small>OVIND</small> <big>I</big><small>NSTITUTE</small> <big>O</big><small>F</small> <big>T</big><small>ECHNOLOGY</small></p>

        <form action="/RIT/Login"  autocomplete="off" method="post" class="validate">
            <% if (request.getAttribute("msg") != null) 
            {
                if(request.getAttribute("value").equals("0"))
                  {
            %>
            <div class="alert alert-error">
                <strong>Error! </strong><%=request.getAttribute("msg")%>
            </div>
            <%
                  }
                else
               {
            %>
            <div class="alert alert-success">
                <strong>Success! </strong><%=request.getAttribute("msg")%>
            </div>
            <%
                }
            }
            %>
            <div class="login">
                <div class="email">
                    <label for="user">Email</label><div class="email-input"><div class="control-group"><div class="input-prepend"><span class="add-on"><i class="ficon-mail3"></i></span><input type="text" id="user" name="user" class="email"></div></div></div>
                </div>
                <div class="pw">
                    <label for="pw">Password</label><div class="pw-input"><div class="control-group"><div class="input-prepend"><span class="add-on"><i class="ficon-lock"></i></span><input type="password" id="pw" name="pw" class='password'></div></div></div>
                </div>
            </div>
            <% if(Authenticate.Query.smartLogin())
                 {
             %>
            <div class="submit">
                <input type="hidden" value="0" name="admin">
                <button class="btn btn-red5">Login</button>
            </div>
            <%
                 }
               else
                 {
             %>
               <div class="submit">
                   <input type="hidden" value="1" name="admin">
                <button class="btn btn-red5">Register</button>
               </div>
             <%
                 }
             %>
        </form>
    </div>
    <script src="/RIT/js/jquery.js"></script>
    <script src="/RIT/js/jquery.validate.min.js"></script>
    <script src="/RIT/js/jquery.metadata.js"></script>
    <script src="/RIT/js/error.js"></script>
</body>


</html>
<%
    }
    catch(Exception e)
    {
        out.println("<div class='alert alert-error'><strong>Please Contact To System Administrator</strong></div>");
    }
%>